<!DOCTYPE html>
<html>
	<head>
		<include file="./Public/Header/header.html,./Public/Header/jquery.html,./Public/Header/mobile.html" />
		<link rel="stylesheet" href="__SCRATCH__/css/scratchStyle.css" />
		<script type="text/javascript" src="__SCRATCH__/js/wScratchPad.js"></script>	
		<title>抽奖页面</title>
	</head>
<body>
<div id="scratchpage" data-role="page" data-theme="c">
<include file="By/mobile_header" header="抽奖页面"/>
<div class="activity-scratch-card-winning">
	<div class="scratch">
		<img src="__SCRATCH__/images/activity-scratch-card-bannerbg.png">
		<div id="prize" style="display:none">
			{$prize['name']}
		</div>
		<div id="scratchpad">
		</div>
	</div>
<if condition="$prize.id lt 7">
	<div id="zjl" style="display:none" class="boxcontent boxwhite">
	<div class="box">
		<div class="title-red">
			<span>
				恭喜您:
			</span>
		</div>
		<div class="Detail">
			<p>您的抽奖码为：<span class="red">{$code}</span></p>
			<p>您获得了：<span class="red">{$prize['name']}（{$prize['content']}）</span></p>
			<p>兑奖方式：将中奖页面截图后展示给兑奖管理员，若手机无法截图也可直接将中奖页面展示给兑奖管理员</p>
		</div>
	</div>
</div>

<else />
<div id="zjl" style="display:none" class="boxcontent boxwhite">
<div class="box">
	<div class="title-orange">
		<span>
			很抱歉：
		</span>
	</div>
	<div class="Detail">
		<p>您没有中奖</p>
	</div>
		</div>
	</div>
</if>
	<div class="boxcontent boxwhite">
		<div class="box">
			<div class="title-green">
				<span>奖项设置：</span>
			</div>
			<div class="Detail">
				<table>
					<tr>
						<th>奖项</th><th>奖励</th><th>总数</th>
					</tr>
					<foreach name="prize_arr" item="prizeArr">
						<tr>
							<td>{$prizeArr.name}</td><td>{$prizeArr.content}</td><td>{$prizeArr.v}</td>
						</tr>
					</foreach>
				</table>
			</div>
		</div>
	</div>
	<div class="boxcontent boxwhite">
		<div class="box">
			<div class="title-brown">
				活动说明：
			</div>
			<div class="Detail">
				<span style="color: red">
					本次活动为北洋集团员工年终福利活动，每位员工凭借抽奖码可参与一次抽奖活动，祝您抽得大奖！
				</span>
			</div>
		</div>
	</div>
</div>
</div>
<script type="text/javascript">
$('#scratchpage').bind('pageinit', function(event) {
	var num = 0;
	var goon = true;
	$("#scratchpad").wScratchPad({
		width: 150,
		height: 40,
		color: "#a9a9a7",
		scratchMove: function() {
			num++;
		 if (num > 10 && goon) {						
				goon = false;							
				$("#zjl").slideToggle(500);
			}
		}
	});
	$("#prize").slideToggle(10);
});
</script>
</body>
</html>